home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.710 < prev    next >
Text File  |  1992-02-06  |  2KB  |  51 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f2\fswiss Helvetica;}
  2. \paperw11720
  3. \paperh9020
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 text object highlight bug\
  8. \
  9.  
  10. \fi-360\li360 Q: My application is modifying text while display is disabled in its window.  This is causing weird highlighting splotches to appear on my screen. What's going on?  \
  11. \
  12. Q:  I'm getting weird highlighting splotches on my screen when running my application.  The problem doesn't appear to be in my code. What's going on?\
  13.  
  14. \fi0\li0 \
  15.  
  16. \fi-360\li360 \
  17. A:  
  18. \fc0 There is a bug in the text object such that when you modify the attributes of the selection  (e.g. with 
  19. \b setSelFontStyle
  20. \b0 :), the Text object tries to highlight (or unhighlight) the modified text, even if the Text's window's display is disabled.  The visible result of this is highlighted splotches on whatever view happened to be lockFocus'ed on last. That frequently turns out to be a menu, in which case the splotches are there for the rest of the application's life (unless you happen to do the same thing again and exactly reverse the unwanted highlighting).\
  21. \
  22. You have a few options on how you can work around this bug:\
  23.  
  24. \fi-20 • Avoid using the “
  25. \b setSelXXX:
  26. \b0 ” methods while display is disabled.  \
  27. • Use the window method 
  28. \b disableFlushWindow
  29. \b0  instead of 
  30. \b disableDisplay
  31. \b0  to synchronize your changes.\
  32. • When you 
  33. \b disableDisplay
  34. \b0  to do programmatic things to a Text object, 
  35. \b lockFocus
  36. \b0  on the Text. After you 
  37. \b reenableDisplay
  38. \b0 , 
  39. \b unlockFocus
  40. \b0  on the Text.\
  41.  
  42. \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600 \
  43.  
  44. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \
  45. QA710\
  46. \
  47. Valid for 1.0\
  48. Valid for 2.0\
  49. \
  50.  
  51.